<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="../js/mock-min.js"></script>
    <script>
        // 数据模板定义规范
        let data = Mock.mock({
            'list|1-10':[
                {
                    'num|1-5':1,
                    'str|1-5':"hello",
                    'flag|1':true,
                    'gender':/[男女]/,
                    'bool':'@boolean',
                    'info':'@string',
                    'born':'@datetime("yyyy年MM月dd日")',
                    'head':'@image',
                    'color':'@color',
                    'text':'@upper(@paragraph)',
                    'myname':'@cname',
                    'url':'@url("http")',
                    'addr':'@county(true)',
                    'guid':'@guid',
                    'myid':'@id',
                    'incre':'@increment',
                    'blood':/(A|B|AB|O)型/
                }
            ]
        });
        console.log(data);

        // 数据占位符定义规范
        let Random = Mock.Random;
        console.log(Random.date('yyyy年MM月dd日'));
    </script>
</body>
</html>